import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '论文标题',
    align: "center",
    dataIndex: 'paperTitle'
  },
  {
    title: '论文作者',
    align: "center",
    dataIndex: 'paperAuthor'
  },
  {
    title: '论文领域类型',
    align: "center",
    dataIndex: 'paperFieldType'
  },
  {
    title: '论文摘要',
    align: "center",
    dataIndex: 'paperAbstract',
  },
  {
    title: '论文简介',
    align: "center",
    dataIndex: 'paperIntroduction',
  },
  {
    title: '发表时间',
    align: "center",
    dataIndex: 'publicationTime',
    customRender:({text}) =>{
      text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
      return text;
    },
  },
];

// 高级查询数据
export const superQuerySchema = {
  paperTitle: {title: '论文标题',order: 0,view: 'text', type: 'string',},
  paperAuthor: {title: '论文作者',order: 1,view: 'text', type: 'string',},
  paperFieldType: {title: '论文领域类型',order: 2,view: 'text', type: 'string',},
  paperAbstract: {title: '论文摘要',order: 3,view: 'umeditor', type: 'string',},
  paperIntroduction: {title: '论文简介',order: 4,view: 'umeditor', type: 'string',},
  publicationTime: {title: '发表时间',order: 5,view: 'date', type: 'string',},
};
